#include <iostream>
using namespace std;

int main()
{
    double x;
    char op;
    cin >> x >> op;
    int ret = 0;

    if (x <= 1) ret += 20;
    else
    {
        ret += 20;
        x = x - 1;
        ret += (int)x;
        if (x - (int)x > 0) ret++;
    }
    if (op == 'y') ret += 5;
    cout << ret << endl;
    return 0;
}